
body {
    margin: 0;
    font-size: 16px;
}

* {
    box-sizing: border-box;
}

.background {
    background: #2C2C2C;
    display: flex;
    height: 100vh;
}

.gallery {
    margin: auto;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    perspective: 40rem;
}

.card {
    position: relative;
    width: 7rem;
    height: 10rem;
    cursor: pointer;
    transition: 1s ease-in-out;
    transform-style: preserve-3d;
}
  
.card:hover {
    transform: rotateY(0.5turn);
}
  
.card__side {
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    width: 100%;
    height: 100%;
    transition: 1s ease-in-out;
}

.card__side--back {
    transform: rotateY(0.5turn);
}

.card__side > img {
    width: 7rem;
    height: 10rem;;
    object-fit: cover;
}